package edu.sctu.xiangkun.day201506.day20150607.TextTwo;

import static java.lang.Thread.sleep;

/**
 * Created by user21 on 2015/6/7.
 */
public class Timer {

    public int time;

    public Timer(int time){
        this.time = time;
    }

    public void run(){
        System.out.println("******计时器******");
        for(int i=0;i<time;i++){
            System.out.print(i+" ");
            try{
                sleep(1000);
            }catch(InterruptedException e){
                e.printStackTrace();
            }
            }
    }
}
